<?php

/**
 * Reaction form base class.
 *
 * @package    form
 * @subpackage reaction
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
 */
class BaseReactionForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                   => new sfWidgetFormInputHidden(),
      'user_id'              => new sfWidgetFormPropelSelect(array('model' => 'User', 'add_empty' => true)),
      'statement_id'         => new sfWidgetFormPropelSelect(array('model' => 'LypoStatement', 'add_empty' => true)),
      'text'                 => new sfWidgetFormTextarea(),
      'video_raw_embed_code' => new sfWidgetFormTextarea(),
      'video_raw_link'       => new sfWidgetFormInput(),
      'video_code'           => new sfWidgetFormInput(),
      'video_type'           => new sfWidgetFormInput(),
      'num_respects'         => new sfWidgetFormInput(),
      'created_at'           => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                   => new sfValidatorPropelChoice(array('model' => 'Reaction', 'column' => 'id', 'required' => false)),
      'user_id'              => new sfValidatorPropelChoice(array('model' => 'User', 'column' => 'id', 'required' => false)),
      'statement_id'         => new sfValidatorPropelChoice(array('model' => 'LypoStatement', 'column' => 'id', 'required' => false)),
      'text'                 => new sfValidatorString(array('required' => false)),
      'video_raw_embed_code' => new sfValidatorString(array('required' => false)),
      'video_raw_link'       => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'video_code'           => new sfValidatorString(array('max_length' => 128, 'required' => false)),
      'video_type'           => new sfValidatorString(array('max_length' => 32, 'required' => false)),
      'num_respects'         => new sfValidatorInteger(array('required' => false)),
      'created_at'           => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('reaction[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Reaction';
  }


}
